home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsGridLayout2.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  100 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2.  
  3. /* ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is Mozilla Communicator client code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 1998
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Eric D Vaughan (original author)
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #ifndef nsGridLayout2_h___
  41. #define nsGridLayout2_h___
  42.  
  43. #include "nsStackLayout.h"
  44. #include "nsIGridPart.h"
  45. #include "nsCOMPtr.h"
  46. #include "nsIFrame.h"
  47. #include "nsGrid.h"
  48.  
  49. class nsGridRowGroupLayout;
  50. class nsGridRowLayout;
  51. class nsGridRow;
  52. class nsBoxLayoutState;
  53. class nsGridCell;
  54.  
  55. class nsGridLayout2 : public nsStackLayout, 
  56.                       public nsIGridPart
  57. {
  58. public:
  59.  
  60.   friend nsresult NS_NewGridLayout2(nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout);
  61.  
  62.   NS_DECL_ISUPPORTS_INHERITED
  63.  
  64.   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
  65.  
  66.   NS_IMETHOD CastToRowGroupLayout(nsGridRowGroupLayout** aRowGroup);
  67.   NS_IMETHOD CastToGridLayout(nsGridLayout2** aGrid);
  68.   NS_IMETHOD GetGrid(nsIBox* aBox, nsGrid** aList, PRInt32* aIndex, nsGridRowLayout* aRequestor=nsnull);
  69.   NS_IMETHOD GetParentGridPart(nsIBox* aBox, nsIBox** aParentBox, nsIGridPart** aParentGridPart);
  70.   NS_IMETHOD GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
  71.   NS_IMETHOD GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
  72.   NS_IMETHOD GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
  73.   NS_IMETHOD CountRowsColumns(nsIBox* aBox, PRInt32& aRowCount, PRInt32& aComputedColumnCount);
  74.   NS_IMETHOD DirtyRows(nsIBox* aBox, nsBoxLayoutState& aState);
  75.   NS_IMETHOD BuildRows(nsIBox* aBox, nsGridRow* aRows, PRInt32* aCount);
  76.   NS_IMETHOD GetTotalMargin(nsIBox* aBox, nsMargin& aMargin, PRBool aIsHorizontal);
  77.   NS_IMETHOD GetRowCount(PRInt32& aRowCount);
  78.   NS_IMETHOD ChildrenInserted(nsIBox* aBox, nsBoxLayoutState& aState,
  79.                               nsIBox* aPrevBox, nsIBox* aChildList);
  80.   NS_IMETHOD ChildrenAppended(nsIBox* aBox, nsBoxLayoutState& aState,
  81.                               nsIBox* aChildList);
  82.   NS_IMETHOD ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState,
  83.                              nsIBox* aChildList);
  84.   NS_IMETHOD ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState,
  85.                          nsIBox* aChildList);
  86. protected:
  87.  
  88.   nsGridLayout2(nsIPresShell* aShell);
  89.   nsGrid mGrid;
  90.  
  91. private:
  92.   void AddWidth(nsSize& aSize, nscoord aSize2, PRBool aIsHorizontal);
  93.  
  94.  
  95. }; // class nsGridLayout2
  96.  
  97.  
  98. #endif
  99.  
  100.